import Vue from "vue";
import VueRouter from 'vue-router';
import {RouteConfig} from "vue-router/types/router";

Vue.use(VueRouter);

export const routes: RouteConfig[] = [
  {
    path: '/getButtonRight',
    name: '获取按钮权限',
    component: () => import('./CopyCode/XAYL/GetButtonRightTest.vue'),
    meta: {
      query: {
        masmcode: 'mas-designer-002_copy'
      }
    }
  },
  {
    path: '/gisMap',
    name: 'GIS地图',
    component: () => import('./CopyCode/XAYL/GisMap.vue'),
    props: {
      sceneID: '32d7f919-513f-4368-8b39-61e71f875596'
    }
  },
  {
    path: '/localPage',
    name: '本地分页',
    component: () => import('./CopyCode/element/pagination/LocalPagination.vue'),
  },
  {
    path: '/normalPage',
    name: '正常分页',
    component: () => import('./CopyCode/element/pagination/NormalPagination.vue'),
  },
  {
    path: '/lsDialog',
    name: '弹窗面板',
    component: () => import('./components/lsDialog/LsDialogOpenTest.vue'),
  },
  {
    path: '/rollNumber',
    name: '滚动的数值',
    component: () => import('./components/rollNumber/LsRollNumberTest.vue'),
  },
  {
    path: '/radioButtonPanel',
    name: '单选按钮面板',
    component: () => import('./components/radioButtonPanel/test/RadioButtonPanel.vue'),
  },
];

if (import.meta.env.DEV) {
  routes.push({
    path: '/',
    name: '导航页',
    meta: {
      showInList: false
    },
    component: () => import('./ViewSelector.vue')
  });
}

const router = new VueRouter({
  base: import.meta.env.BASE_URL,
  routes,
})

export default router;
